package com.sg.business.projectgroup.labelprovider;

import org.eclipse.jface.viewers.ColumnLabelProvider;

import com.sg.business.model.Organization;
import com.sg.business.model.WorkDefinition;

public class WorkDefinitionOrgLabelProvider extends ColumnLabelProvider {

	public WorkDefinitionOrgLabelProvider() {
	}

	@Override
	public String getText(Object element) {
		if (element instanceof WorkDefinition) {
			WorkDefinition workd = (WorkDefinition)element;
			Organization organization = workd.getOrganization();
			if(organization != null) {
				String desc = organization.getDesc();
				return desc;
			}
		}
		return "?";
	}
}
